﻿using SmartPlant.Model;
using SmartPlant.Model.Biz;
using SmartPlant.Services.Interfaces;
using SmartPlant.WinCore;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Net.Http;
using System.Security.Cryptography;
using System.IO;
using System.Threading.Tasks;
using System.Web;
using static System.Formats.Asn1.AsnWriter;
using SmartPlant.Model.DbContext;
using Org.BouncyCastle.Asn1.Ocsp;
using SqlSugar;

namespace SmartPlant.Services
{
    public class SpecFormService : BaseService, ISpecFormService
    {



        public async Task<List<SpecForm>> GetList(string sqlWhere="spec_form_id != '0'", string select="*", string orderby="spec_form_cnum")
        {
            string uri = $"/api/Project/{GlobalObject.CurrentProject.ProjId}/spec-form-api" +
                $"?sqlwhere={sqlWhere}" +
                $"&select={select}" +
                $"&orderby={orderby}";
            RESTfulResult<List<SpecForm>> r = await GetAsync<List<SpecForm>>(uri);

            return r.data;
        }
    }
}